home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Prog / D-G / Floating Archive / Floating Arc Folder / READ ME! < prev    next >
Encoding:
Text File  |  1991-02-17  |  4.7 KB  |  156 lines  |  [TEXT/KAHL]

  1. /*************************************************************************
  2.  
  3.     FLOATING WINDOW 1.3
  4.     
  5.  *************************************************************************
  6.  
  7.     COPYRIGHT © 1991 THE UNKNOWN SOFTWARE GROUP.  ALL RIGHTS RESERVED.
  8.  
  9.     Questions, comments, etc.
  10.     
  11.         To: Patrick Doane
  12.             89 Fair Street.
  13.             Guilford, CT  06437
  14.  
  15.         America-On-Line:    Patrick5
  16.         
  17.         Phone:    (203) 458-9936
  18.  
  19.  *************************************************************************/
  20.  
  21.  With version 1.3, I believe the system is finally perfect. Although you
  22. may experience a few things wrong at first, with a little fiddling it
  23. does work.
  24.  If for some reason you find a technique that doesn't work and you feel
  25. support should be added for it, contact me.
  26.  
  27.  
  28.  
  29. CREATION OF NEW WINDOWS:
  30.  
  31. /* Note the fact the I use the behindWindow parameter as OL. It is
  32.    essential that this is added or the entire system will fail. If you pass
  33.    -1L as which is normally done, it will place the window in front of the
  34.    floating windows which will cause the floating window to get lost in
  35.    the crowd of windows. */
  36.  
  37. theWindow = GetNewWindow(128,0L,0L);
  38.  
  39. /* Then call SelectTheWindow when you want to make your window visible.
  40.    SelectTheWindow will take care of where the window will become visible
  41.    within the window list and make it appear below all other floating
  42.    windows. */
  43.  
  44. SelectTheWindow(theWindow);
  45.  
  46.  
  47.  If you find a way which you think should work that doesn't, drop me a note
  48. and I'll see what I can do to make sure it does.
  49.  
  50.  You may also find a little problem with the handling of DA windows. The
  51. routine, UpdateTopWindow() must be called after OpenDeskAcc() and
  52. SystemClick();
  53.  
  54.  
  55. EXPLANATIONS OF ROUTINES:
  56.  
  57. void        InitFloat(void);
  58.  
  59.     InitFloat should be called when your application is started up. Usually
  60.     right after you have initialized other toolbox managers. The program
  61.     will likely crash if you use floating windows without calling
  62.     InitFloat();
  63.  
  64. void        UpdateTopWindow(void);
  65.  
  66.     An internal routine used to update the top non-floating window.
  67.     Normally, you will have no need to call it yourself except where
  68.     DA's are involved.
  69.     
  70. void        UpdateFloats(void);
  71.  
  72.     Another internal routine used to update the floating window variables
  73.     topFloat and bottomFloat. It scans through the list setting these
  74.     variables to their appropriate values.
  75.  
  76. WindowPtr    NewFloatingWindow(short ResID,Ptr wStorage);
  77.  
  78.     Create a new floating window. It will bring the window the front
  79.     and make it the new top floating window.
  80.     
  81. void        MakeFloating(WindowPtr whichWindow);
  82.  
  83.     Marks a window as a floating window and makes sure it is visible.
  84.  
  85. Boolean        IsFloating(WindowPtr whichWindow);
  86.  
  87.     Tests to see if a window is a floating window.
  88.     
  89. void        CloseTheWindow(WindowPtr whichWindow);
  90.  
  91.     Replacement routine for toolbox routine CloseWindow. Will correctly
  92.     activate the next visible window and update the floating windows.
  93.  
  94. void        DisposeTheWindow(WindowPtr whichWindow);
  95.  
  96.     Replacement routine for toolbox routine DisposeWindow. Will correctly
  97.     activate the next visible window and update the floating windows.
  98.  
  99. void        ShowTheWindow(WindowPtr whichWindow);
  100.  
  101.     Replacement routine for toolbox routine DisposeWindow. Hilites the
  102.     window if necessary.
  103.  
  104. void        HideTheWindow(WindowPtr whichWindow);
  105.  
  106.     Replacement routine for toolbox routine DisposeWindow. Hilites 
  107.     another window if necessary.
  108.  
  109. void        ShowFloats(void);
  110.  
  111.     ShowFloats will make all the floating windows visible. This routine
  112.     should be called in response to a Resume Event.
  113.     
  114. void        HideFloats(void);
  115.  
  116.     HideWindows will make all the floating windows invisible. This routine
  117.     should be called in response to a Suspend Event.
  118.     
  119. WindowPtr    CurrentWindow(void);
  120.  
  121.     Replacement routine for toolbox routine FrontWindow. It returns the
  122.     internal variable topWindow.
  123.  
  124. void        SelectTheWindow(register WindowPtr whichWindow);
  125.  
  126.     Replacement routine for toolbox routine SelectWindow. If the window
  127.     is a floating window, it brings it to the front. Otherwise it brings
  128.     it behind the bottommost floating window.
  129.  
  130. void        DragTheWindow(WindowPtr whichWindow,EventRecord *theEvent);
  131.  
  132.     Replacement routine for toolbox routine DragWindow. It will not bring
  133.     the window to the front as does DragWindow and will also correctly
  134.     set up the drag region.
  135.  
  136. void        CalcWindowVis(register WindowPeek whichWindow);
  137.  
  138.     Internal routine used for the calculation of a windows visible region.
  139.  
  140. void        GlobalRgn(register RgnHandle changeRgn);
  141.  
  142.     Handy utility which converts a region to global coordinates.
  143.  
  144. void        LocalRgn(register RgnHandle changeRgn);
  145.  
  146.     Handy utility which converts a region to local coordinates.
  147.  
  148.  
  149. PROGRAM CHANGES
  150.  
  151.     Sometimes it is necessary to call UpdateTopWindow when you have DA's
  152.     running. Below is a list of occurences that may cause the topWindow
  153.     global variable to become invalid.
  154.  
  155.  - MouseDown in a system window (DA)
  156.  - Launching a DA